package com.learn.cloud.validator.exception;

import com.learn.cloud.validator.bean.ValidationError;
import lombok.Getter;

import java.lang.reflect.Method;
import java.util.List;

/**
 * @description: 校验异常
 * @author: cong zhi
 * @createDate: 2022/2/6 15:06
 * @updateUser: cong zhi
 * @updateDate: 2022/2/6 15:06
 * @updateRemark: 修改内容
 * @version: v1.0
 */
@Getter
public class ValidationException extends RuntimeException {

    public ValidationException(String message, Method method, List<ValidationError> validationErrors) {
        super(message);
        this.method = method;
        this.validationErrors = validationErrors;
    }

    private final Method method;


    private final List<ValidationError> validationErrors;
}
